package com.example.shop_2212.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.Goods
import com.example.shop_2212.R
import com.example.shop_2212.utils.GlideUtils

class GoodsAdapter:BaseQuickAdapter<Goods,BaseViewHolder>(R.layout.item_goods) {
    override fun convert(holder: BaseViewHolder, item: Goods) {
        GlideUtils.loadCornerImage(context,item.image,holder.getView(R.id.goods_iv),20)
        holder.setText(R.id.goods_name,item.storeName)
        holder.setText(R.id.goods_price,"￥${item.price}")
        holder.setText(R.id.goods_num,"已售${item.sales+item.ficti}件")
    }
}